from django.db import models

# Create your models here.
class Author(models.Model):
    name = models.CharField(max_length=32)
    age = models.IntegerField()
    def __str__(self):
        return self.name
class Book(models.Model):
    name = models.CharField(max_length=32)
    author = models.ForeignKey(Author)
    def __str__(self):
        return self.name